﻿/*
 * 
 * User: Gavin Mead
 * Date: 11/21/2009
 * Time: 4:13 PM
 * 
 * 
 */

using System;
using NUnit.Framework;

using GraphLibrary;

namespace GraphLibraryTests
{
	[TestFixture]
	public class BaseVertexIdTests
	{
	    public class JunkVertexId : IVertexId
	    {
	        public JunkVertexId() {}
	        
            public string FriendlyName {
                get {
                    throw new NotImplementedException();
                }
                set {
                    throw new NotImplementedException();
                }
            }
	    }
	    
		[Test]
		[Description("Tests that a vertex id returns true when it performing " +
		             "an equals on itself.")]
		public void EqualVertexIdsTests()
		{
			IVertexId id = new BaseVertexId();
			
			Assert.True(id.Equals(id));
		}
		
		[Test]
		[Description("Tests that an IVertexId.equals() returns false when checked " +
		             "against another IVertexId")]
		public void NotEqualVertexIdsTest()
		{
		    IVertexId id1 = new BaseVertexId();
		    IVertexId id2 = new BaseVertexId();
		    
		    Assert.False(id1.Equals(id2));
		}
		
		[Test]
		[Description("Tests that an IVertexId returns false when checked " +
		             "against a different implementation of IVertexId")]
		public void JunkVertexIdEqualityTest()
		{
		    IVertexId id1 = new BaseVertexId();
		    IVertexId id2 = new JunkVertexId();
		    
		    Assert.False(id1.Equals(id2));
		}
		
	}
}
